﻿<%@ Page Language="C#" MasterPageFile="~/SubForm.Master" AutoEventWireup="true" Codebehind="ImportOrionForecast.aspx.cs"
    Inherits="PreContractWeb.Task.ImportOrionForecast" %>

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Register Assembly="Microsoft.Web.UI.WebControls, Version=1.0.2.226, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="Microsoft.Web.UI.WebControls" TagPrefix="iewc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
    </div>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <Triggers>
            <asp:PostBackTrigger ControlID="btnUpload" />
        </Triggers>
        <ContentTemplate>
            <div style="text-align: center">
                <table width="95%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="100%" height="100%" valign="middle" align="center">
                            <br />
                            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td class="panel_header">
                                        <!--标题-->
                                        导入Orion信息(Import Orion Forecast)
                                        <!--标题-->
                                    </td>
                                    <td width="5" rowspan="2" background="../Images/BG-Border-Right.png" valign="top">
                                        <img src="../Images/BG-Border-RT.png" border="0" /></td>
                                </tr>
                                <tr>
                                    <td class="panel_body">
                                        <!--Panel Body-->
                                        <table style="width: 100%">
                                            <tr>
                                                <td style="text-align: center;">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <table style="width: 100%; height: 100%">
                                                        <tr>
                                                            <td style="text-align: left; width: 65%">
                                                                <asp:FileUpload ID="uplFile" runat="server" Width="100%" /></td>
                                                            <td style="text-align: left; width: 15%">
                                                                <asp:Button ID="btnUpload" CssClass="bgButton" runat="server" Text="上传 (Upload)"
                                                                    OnClick="btnUpload_Click" autoajax="true" autovisible="true" /></td>
                                                            <td style="width: 20%">
                                                                <a href="../ExcelTemplate/OrionTemplate.xls">模板下载(Template Download)</a></td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                        </table>
                                        <!---->
                                    </td>
                                </tr>
                                <tr>
                                    <td height="5" background="../Images/BG-Border-Bottom.png" align="left">
                                        <img src="../Images/BG-Border-LB.png" border="0" /></td>
                                    <td width="5" height="5" background="../Images/BG-Border-RB.png">
                                    </td>
                                </tr>
                            </table>
                            <br />
                            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td align="left">
                                        <iewc:TabStrip ID="tabDocument" runat="server" SepDefaultStyle="border-bottom:solid 1px bottom;"
                                            TabSelectedStyle="border:solid 1px #BBBBBB;border-bottom:none;padding-left:20px;padding-right:20px; background-image:url(../images/BG-Button-09.png);"
                                            TabHoverStyle="background-image: url(../images/BG-Button-09.png);" TabDefaultStyle="border:solid 1px BBBBBB;padding-left:20px;padding-right:20px;background-image: url(../images/BG-Button-08.png);"
                                            TargetID="mpTabDocumentPages" Height="25" AutoPostBack="false">
                                            <iewc:Tab Text="没找到的预合同"></iewc:Tab>
                                            <iewc:TabSeparator />
                                            <iewc:Tab Text="已更新的预合同"></iewc:Tab>
                                            <iewc:TabSeparator />
                                            <iewc:Tab Text="未在Orion中预测的预合同"></iewc:Tab>
                                            <iewc:TabSeparator DefaultStyle="width:100%;border-bottom-width:1px; border-bottom-color:#BBBBBB; border-bottom-style:solid;" />
                                        </iewc:TabStrip>
                                    </td>
                                    <td>
                                    </td>
                                </tr>
                                <tr>
                                    <td width>
                                        <iewc:MultiPage ID="mpTabDocumentPages" runat="server" CssClass="mutil_panel_body"
                                            Width="100%">
                                            <iewc:PageView id="DocDetail" runat="server">
                                                <!--Panel Body-->
                                                <asp:Panel ID="pnlgv" runat="server" HorizontalAlign="left" Width="100%" Height="100%">
                                                    <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;总数(Total):<span id="totalSpan" runat="server"></span></b>
                                                    <div style="overflow-y: auto; overflow-x: auto; width: 760px" id="divGrid">
                                                        <asp:GridView ID="gvMain" runat="server" AutoGenerateColumns="False" Width="600px"
                                                            DataKeyNames="PreContractNo" OnRowDataBound="gvMain_RowDataBound">
                                                            <PagerSettings Visible="False"></PagerSettings>
                                                            <RowStyle Height="20px" CssClass="table_row_1"></RowStyle>
                                                            <SelectedRowStyle CssClass="SelectedRow"></SelectedRowStyle>
                                                            <HeaderStyle CssClass="table_header"></HeaderStyle>
                                                            <AlternatingRowStyle CssClass="table_row_2"></AlternatingRowStyle>
                                                            <EmptyDataTemplate>
                                                                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                                                    <tr>
                                                                        <td class="panel_header">
                                                                            <!--标题-->
                                                                            没有数据(No Data).
                                                                            <!--标题-->
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </EmptyDataTemplate>
                                                            <Columns>
                                                                <asp:BoundField DataField="PreContractNo" HeaderText="预合同编号&lt;br/&gt;Pre-Contract No"
                                                                    SortExpression="PreContractNo" HtmlEncode="false" />
                                                                <asp:BoundField DataField="BDCode" HeaderText="事业部&lt;br/&gt;PU" SortExpression="BDCode"
                                                                    HtmlEncode="false" />
                                                                <asp:BoundField DataField="SignDue" HeaderText="预计转正时间&lt;br/&gt;Orion Date" SortExpression="SignDue"
                                                                    DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="false" />
                                                                <asp:BoundField DataField="OrionPrice" HeaderText="预计转正金额&lt;br/&gt;Orion RMB" SortExpression="OrionPrice"
                                                                    HtmlEncode="false" DataFormatString="{0:N2}" />
                                                            </Columns>
                                                        </asp:GridView>
                                                        <table>
                                                            <tr>
                                                                <td>
                                                                    &nbsp;</td>
                                                            </tr>
                                                        </table>
                                                    </div>
                                                </asp:Panel>
                                                <!---->
                                            </iewc:PageView>
                                            <iewc:PageView id="DocProperty" runat="server">
                                                <!--Panel Body-->
                                                <asp:Panel ID="Panel2" runat="server" HorizontalAlign="left" Width="100%" Height="100%">
                                                    <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;总数(Total):<span id="totalSpan_Updated" runat="server"></span></b>
                                                    <div style="overflow-y: auto; overflow-x: auto; width: 760px" id="divGridTwo">
                                                        <asp:GridView ID="gvUpdated" runat="server" AutoGenerateColumns="False" Width="600px"
                                                            DataKeyNames="PreContractNo" OnRowDataBound="gvUpdated_RowDataBound">
                                                            <PagerSettings Visible="False"></PagerSettings>
                                                            <RowStyle Height="20px" CssClass="table_row_1"></RowStyle>
                                                            <SelectedRowStyle CssClass="SelectedRow"></SelectedRowStyle>
                                                            <HeaderStyle CssClass="table_header"></HeaderStyle>
                                                            <EmptyDataTemplate>
                                                                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                                                    <tr>
                                                                        <td class="panel_header">
                                                                            <!--标题-->
                                                                            没有数据(No Data).
                                                                            <!--标题-->
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </EmptyDataTemplate>
                                                            <AlternatingRowStyle CssClass="table_row_2"></AlternatingRowStyle>
                                                            <Columns>
                                                                <asp:BoundField DataField="PreContractNo" HeaderText="预合同编号&lt;br/&gt;Pre-Contract No"
                                                                    SortExpression="PreContractNo" HtmlEncode="false" />
                                                                <asp:BoundField DataField="BDCode" HeaderText="事业部&lt;br/&gt;PU" SortExpression="BDCode"
                                                                    HtmlEncode="false" />
                                                                <asp:BoundField DataField="SignDue" HeaderText="预计转正时间&lt;br/&gt;Orion Date" SortExpression="SignDue"
                                                                    DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="false" />
                                                                <asp:BoundField DataField="OrionPrice" HeaderText="预计转正金额&lt;br/&gt;Orion RMB" SortExpression="OrionPrice"
                                                                    HtmlEncode="false" DataFormatString="{0:N2}" />
                                                            </Columns>
                                                        </asp:GridView>
                                                        <table>
                                                            <tr>
                                                                <td>
                                                                    &nbsp;</td>
                                                            </tr>
                                                        </table>
                                                    </div>
                                                </asp:Panel>
                                                <!---->
                                            </iewc:PageView>
                                            <iewc:PageView id="DocNotExisted" runat="server">
                                                <!--Panel Body-->
                                                <asp:Panel ID="Panel1" runat="server" HorizontalAlign="left" Width="100%" Height="100%">
                                                    <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;总数(Total):<span id="totalSpan_NotExists" runat="server"></span></b>
                                                    <div style="overflow-y: auto; overflow-x: auto; width: 760px;" id="divGridThree">
                                                        <asp:GridView ID="gvNotExisted" runat="server" AutoGenerateColumns="False" Width="750px"
                                                            DataKeyNames="PreContractNo" OnRowDataBound="gvUpdated_RowDataBound">
                                                            <PagerSettings Visible="False"></PagerSettings>
                                                            <RowStyle Height="20px" CssClass="table_row_1"></RowStyle>
                                                            <SelectedRowStyle CssClass="SelectedRow"></SelectedRowStyle>
                                                            <HeaderStyle CssClass="table_header"></HeaderStyle>
                                                            <EmptyDataTemplate>
                                                                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                                                    <tr>
                                                                        <td class="panel_header">
                                                                            <!--标题-->
                                                                            没有数据(No Data).
                                                                            <!--标题-->
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </EmptyDataTemplate>
                                                            <AlternatingRowStyle CssClass="table_row_2"></AlternatingRowStyle>
                                                            <Columns>
                                                                <asp:BoundField DataField="PreContractNo" HeaderText="预合同编号&lt;br/&gt;Pre-Contract No"
                                                                    SortExpression="PreContractNo" HtmlEncode="false" ItemStyle-Width="120px" />
                                                                <asp:BoundField DataField="PreContractType" HeaderText="类型&lt;br/&gt;Category" SortExpression="PreContractStatus"
                                                                    HtmlEncode="False">
                                                                    <ItemStyle Width="60px" />
                                                                </asp:BoundField>
                                                                <asp:BoundField DataField="CATCode" HeaderText="CAT" SortExpression="CATCode" HtmlEncode="False">
                                                                    <ItemStyle Width="60px" />
                                                                </asp:BoundField>
                                                                <asp:BoundField DataField="BDCode" HeaderText="事业部&lt;br/&gt;PU" SortExpression="BDCode" ItemStyle-Width="80px"
                                                                    HtmlEncode="false" />
                                                                    
                                                                <asp:BoundField DataField="OrionNo" HeaderText="Orion 编号&lt;br/&gt;Orion No#" SortExpression="OrionNo"
                                                                    HtmlEncode="False">
                                                                    <ItemStyle Width="90px" />
                                                                </asp:BoundField>
                                                                <asp:BoundField DataField="SignDue" HeaderText="预计转正时间&lt;br/&gt;Orion Date" SortExpression="SignDue" ItemStyle-Width="100px"
                                                                    DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="false" />
                                                                <asp:BoundField DataField="CEWPromised" HeaderText="承诺转正金额&lt;br/&gt;Cygnus RMB"
                                                                    SortExpression="CEWPromised" DataFormatString="{0:N2}" HtmlEncode="False">
                                                                    <ItemStyle Width="100px" />
                                                                </asp:BoundField>
                                                                <asp:BoundField DataField="OrionPrice" HeaderText="预计转正金额&lt;br/&gt;Orion RMB" SortExpression="OrionPrice"
                                                                    HtmlEncode="false" DataFormatString="{0:N2}" />
                                                            </Columns>
                                                        </asp:GridView>
                                                        <table>
                                                            <tr>
                                                                <td>
                                                                    &nbsp;</td>
                                                            </tr>
                                                        </table>
                                                    </div>
                                                </asp:Panel>
                                                <!---->
                                            </iewc:PageView>
                                        </iewc:MultiPage>
                                    </td>
                                    <td width="5" background="../Images/BG-Border-Right.png" style="border-left-width: 1px;
                                        border-left-color: #BBBBBB; border-left-style: solid;" valign="top">
                                        <img src="../Images/BG-Border-RT.png" border="0" /></td>
                                </tr>
                                <tr>
                                    <td height="5" background="../Images/BG-Border-Bottom.png" align="left">
                                        <img src="../Images/BG-Border-LB.png" border="0" /></td>
                                    <td width="5" height="5" background="../Images/BG-Border-RB.png">
                                    </td>
                                </tr>
                            </table>
                            <!---->
                        </td>
                    </tr>
                </table>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server">
        <ProgressTemplate>
            <div style="position: absolute; left: 40%; top: 40%; overflow: hidden; background-color: white;
                filter: alpha(opacity=50); opacity: 0.5; -moz-opacity: 0.5;" id="AJAXProgress">
                <table class="table_ajax">
                    <tr>
                        <td style="width: 35px">
                            <img src="../Images/roller.gif" /></td>
                        <td style="width: 100px">
                            Processing...</td>
                    </tr>
                </table>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>

    <script>ResizeDivForScroll('divGrid');ResizeDivForScroll('divGridTwo');ResizeDivForScroll('divGridThree');</script>

</asp:Content>
